package org.jeecg.modules.fund.job;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.fund.entity.FundLibrary;
import org.jeecg.modules.fund.entity.FundList;
import org.jeecg.modules.fund.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.List;
@Slf4j
@Component
public class UpdateAllFundJob {
    @Autowired
    private IFundValueService fundValService;

    /**
     * 每周一至五，晚20点至23点，每40分钟执行一次，净值更新任务
     * @throws InterruptedException
     */
    @Scheduled(cron = "0 0,30 20,21,22,23,0,1,2,3,4,7,8 * * *")
    public void execute() throws InterruptedException {
        // log.info("定时任务");
        fundValService.batchUpdateVal(false);
        // log.info("任务结束");
    }
}
